package adv4;

import java.io.File;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileTest2 {
    public static void main(String[] args) {
        File f=new File("D:\\资料-java");
        //File f=new File("D:\\资料-java","C课程设计基础练习题.doc");
        String[] files = f.list();
        System.out.println(f.getName()+"的下级：");
        if(files!=null){
            for(String file:files){
                System.out.println(file);
            }
        }

    }
}
